package com.mender.api.client;

import com.mender.common.result.Result;
import com.mender.domain.po.Setmeal;
import com.mender.domain.vo.DishVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;


/**
 * 菜品.套餐业务.分类.店铺营业状态
 */
@FeignClient(name = "product-service")
public interface ProductClient {

    /**
     * 根据id查询菜品
     * @param id
     * @return
     */
    @GetMapping("/admin/dish/{id}")
    Result<DishVO> getDishById(@PathVariable Long id);

    /**
     * 查询菜品总览
     *
     * @return
     */
    @PostMapping("/admin/dish/countDishByMap")
    Result<Integer> countDishByMap(@RequestBody Map<String, Object> params);

    /**
     * --------------------------套餐----------------------------------------套餐------------------------------
     */
    @GetMapping("/admin/setmeal/selectByIds")
    Result<List<Setmeal>> selectByIds(@RequestParam List<Long> ids);

    /**
     * 查询套餐总览
     *
     * @return
     */
    @PostMapping("/admin/setmeal/countSetmealByMap")
    Result<Integer> countSetmealByMap(@RequestBody Map<String, Object> params);
}
